<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script>
window.onload=function(){
	var txt1=document.getElementById('txt1');
	var txt2=document.getElementById('txt2');
	var btn=document.getElementById('btn');
	btn.onclick=function(){
		  txt1.value+=txt2.value+'\n';	
		  txt2.value='';
	};
	txt2.onkeydown=function(e){
		var ev=e||event;
		if(ev.ctrlKey && ev.keyCode==13){
			txt1.value+=txt2.value+'\n';	
			txt2.value='';	
		};	
	};
};
</script>
</head>

<body>
<textarea cols="50" rows="10" id="txt1"></textarea>
<input type="text" id="txt2" />
<input type="button" id="btn" value="提交" />
</body>
</html>
